from flask import Flask, render_template


def create_app():
    app = Flask(__name__)
    app.config.from_object('config.settings')

    @app.route('/')
    def index():
        return render_template('index.html')

    from .login import login_blue
    from .admin import admin_blue
    app.register_blueprint(login_blue)
    app.register_blueprint(admin_blue)
    return app
